import request from '@/utils/request'

// 查询歌曲管理列表
export function listSing(query) {
  return request({
    url: '/system/sing/list',
    method: 'get',
    params: query
  })
}

// 查询歌曲管理详细
export function getSing(singId) {
  return request({
    url: '/system/sing/' + singId,
    method: 'get'
  })
}

// 新增歌曲管理
export function addSing(data) {
  return request({
    url: '/system/sing',
    method: 'post',
    data: data
  })
}

// 修改歌曲管理
export function updateSing(data) {
  return request({
    url: '/system/sing',
    method: 'put',
    data: data
  })
}

// 删除歌曲管理
export function delSing(singId) {
  return request({
    url: '/system/sing/' + singId,
    method: 'delete'
  })
}
// 查询歌曲管理详细
export function getSheet(singId) {
  return request({
    url: '/system/sing/getSheet',
    method: 'get',
    params: { singId }
  })
}
// 编辑歌曲曲谱
export function changeSheet(singId, sheetContext) {
  return request({
    url: '/system/sing/changeSheet',
    method: 'post',
    data: {
      singId,
      sheetContext
    }
  })
}
// 上传歌曲曲谱
export function uploadSheet(singId, file) {
  return request({
    url: '/system/sing/uploadSheet?singId=' + singId,
    method: 'post',
    data: file
  })
}
// 歌曲发布状态修改
export function updateReleaseStatus(releaseStatus, singId) {
  return request({
    url: '/system/sing/updateReleaseStatus',
    method: 'post',
    data: { releaseStatus, singId }
  })
}